import { createRouter, createWebHistory,createWebHashHistory } from 'vue-router'
import demo from '../views/demo'
const routes = [
  {
    path: '/',
    name: 'Index',
    meta: {
      title: '首页'
    },
    component: demo
  },
  {
    path: '/accident/driver/:type',
    name: 'Driver',
    meta: {
      title: '信息填写'
    },
    component: ()=>import('../views/accident/driver')
  },
  {
    path: '/accident/vaccines/:type',
    name: 'Vaccines',
    meta: {
      title: '信息填写'
    },
    component: ()=>import('../views/accident/vaccines')
  },
  {
    path: '/property/fuelgas/:type',
    name: 'Property',
    meta: {
      title: '安燃无忧燃气综合险'
    },
    component: () => import('../views/property/fuelgas')
  },
  {
    path: '/duty/guardian/:type',
    name: 'Guardian',
    meta: {
      title: '监护人责任险'
    },
    component: () => import('../views/duty/guardian')
  },
  {
    path: '/travel/travelAccident/:type',
    name: 'TravelAccident',
    meta: {
      title: '旅行意外险'
    },
    component: () => import('../views/travel/travelAccident')
  }
]

const router = createRouter({
  // history: createWebHistory(process.env.BASE_URL),
  history: createWebHashHistory(),
  routes
})

export default router
